#ifndef LAYERDATA_H
#define LAYERDATA_H

#include <QThread>
#include <QString>
#include <QFile>
#include <QDir>
#include "wordlist.h"

typedef enum
{
	e_dico_structure_word,
	e_dico_structure_translation,
	e_dico_structure_enumSize
}e_dico_structure;

class LayerData: public QThread
{
	
public:
	LayerData();
	~LayerData();
	bool loadDico(QString _dicoLocation);
	QStringList getDicos();
	Word		getWord(int idx);
	int			getDicoLength();
	bool		AddWord(Word newWord);
	bool		DeleteWord(int idx);
	void		ClearDico();
	void		SaveDico(QString _dicoLocation);
	void		PlaySound(QString soundName);
	QString		LoadIniSetting(QString settingName);
	void		SaveIniSetting(QString settingName, QString settingValue);
	
private:
	QString		dicoLocation;
	WordList*	dicoWords;
	bool		reWriteDicoFromLocal();
};

#endif // LAYERDATA_H
